▍ humdrum codex / custard v0.2.0
license AGPL-3.0
4.7 KB raw
id
TASK-007
title
custard CLI: preview / promote / release (Charm spinner)
status
🏁 Done
assignee
created_date
2026-06-18 06:36
updated_date
2026-06-18 15:25
labels
feature
dependencies
priority
medium
ordinal
7000

Description

A Charm-style CLI that owns DEPLOY + RELEASE β€” not git push (you keep committing/pushing via lazygit/Claude; deploy is decoupled since 'vercel deploy' uploads the local dir, not the remote). Foreground + inline spinner per stage, so no notification system needed. Reads .custard.yaml for check + deploy config. Verbs: (1) preview β€” run checks, then vercel deploy (preview), print URL; (2) promote β€” vercel promote the latest/chosen preview to prod (same build, no rebuild); (3) release vX.Y.Z β€” run checks, tag + push the tag so the existing brew webhook auto-publishes. Supersedes the earlier server-side-CI sketch in this task's ACs.

Acceptance Criteria

Implementation Notes

Design detail / schema:

.custard.yaml (per repo): brew: { enabled: true, package: "." } # TASK-006 (release) ci: # commands run in order; nonzero exit = fail - go vet ./... - go test ./... deploy: preview: vercel deploy # must print the preview URL on stdout # promote uses: vercel promote (no rebuild)

Verbs (one binary, 'custard '): check run ci on WORKING TREE (dirty ok); no deploy; fast inner loop preview export HEAD (git archive→tmp) → run ci on export → deploy.preview → capture+print URL → POST /status(preview) promote [url] vercel promote last/given preview → prod → POST /status(prod) release vX.Y.Z run ci on HEAD → tag + push tag (TASK-006 webhook publishes brew) → POST /status

Gates: preview/promote do NOT block on a dirty tree (they build from the commit, so uncommitted edits are excluded); they DO require HEAD pushed to soft so deployed==in-repo and the badge maps. check has no gate.

Server additions: POST /status (HMAC, STATUS_SECRET in /etc/custard.env) β†’ persist per (repo,commit); forge reads it to badge commits/branch as: βœ“ in production / πŸ‘ preview / βœ“ checked / ⚠ unverified. State store writable (ReadWritePaths).

Distribution: CLI ships via the self-hosted tap (custard formula) β€” dogfoods TASK-006. Open: status-store backend (flat json vs sqlite); whether release should also require clean tree.